package com.summer.main;

import java.util.concurrent.TimeUnit;

public class TestTime {
	
	public static void main(String[] args) throws InterruptedException {
		System.out.println("start");
		long t1 = System.currentTimeMillis();
//		TimeUnit.SECONDS.sleep(2);
		synchronized (args) {
			TimeUnit.SECONDS.timedWait(args, 2);
		}
		long t2 = System.currentTimeMillis();
		System.out.println(TimeUnit.SECONDS.toSeconds(t2-t1));
		System.out.println(TimeUnit.MICROSECONDS.toSeconds(t2-t1));
		System.out.println(TimeUnit.MILLISECONDS.toSeconds(t2-t1));
		System.out.println(TimeUnit.MILLISECONDS.toSeconds(t1));
		System.out.println(TimeUnit.MINUTES.toSeconds(t2-t1));
		System.out.println("end");
	}
	
}
